/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../public/stylesheets/variables';

.ui-grid-settings {
    color: #393939;

    .grid-settings {
        ul.dropdown-menu {
            padding: 0;
            min-width: auto;

            & > li {
                & > a {
                    padding: 3px 12px;

                    & > span {
                        line-height: 26px;
                        padding-left: 10px;
                        padding-right: 8px;
                        cursor: pointer;
                    }

                    & > i {
                        position: relative;
                        
                        width: 12px;
                        height: 12px;
                        margin-top: 7px;
                        margin-left: 0;

                        color: inherit;
                        line-height: 26px;

                        border: 1px solid #afafaf;
                        border-radius: 2px;
                        background-color: #FFF;

                        box-shadow: inset 0 1px 1px #ccc;

                        &.fa-square-o:before,
                        &.fa-check-square-o:before {
                            content: '';
                        }

                        &.fa-check-square-o {
                            border-color: #0067b9;
                            background-color: #0067b9;

                            box-shadow: none;
                        }

                        &.fa-check-square-o:before {
                            content: '';

                            position: absolute;
                            top: 0;
                            left: 3px;

                            width: 4px;
                            height: 8px;

                            border: solid #FFF;
                            border-width: 0 2px 2px 0;

                            transform: rotate(35deg);
                        }
                    }
                }

                &:not(:last-child) {
                    border-bottom: 1px solid #dddddd;
                }
            }
        }
    }

    &--heading {
        cursor: default;

        sub {
            bottom: 0;
            height: 12px;
            margin-left: 22px;

            font-family: Roboto;
            font-size: 12px;
            line-height: 1;
            text-align: left;
            color: $gray-light;
        }
    }

    &--heading > span {
        position: relative;
        top: -1px;
    }

    &-filter {
        .ignite-form-field {
            $height: 36px;

            width: 260px;

            font-size: 14px;

            label {
                width: auto;
                max-width: initial;
                margin-right: 10px;

                font-size: inherit;
                line-height: $height;
            }

            &__control {
                width: 190px;

                input {
                    &:focus {
                        box-shadow: none;
                    }
                }
            }
        }
    }

    &-number-filter {
        .ignite-form-field {
            width: 180px;
            margin-right: 0;

            &__label {
            }

            &__control {
            }

            &:nth-child(1) {
                float: left;

                .ignite-form-field__label {
                    margin-right: 0;
                    width: 70%;
                    max-width: 100%;
                }

                .ignite-form-field__control {
                    width: 30%;
                }
            }
        }

        button {
            width: auto;
            display: inline-block;
            margin-left: 5px;
        }
    }

    &-dateperiod {
        display: block;
        margin-right: 35px;

        .ignite-form-field {
            $height: 36px;

            display: inline-block;
            width: auto;

            font-size: 14px;

            label.ignite-form-field__label {
                width: auto;
                max-width: initial;

                font-size: inherit;
                line-height: $height;
            }

            .ignite-form-field__control {
                @import "./../../../public/stylesheets/variables.scss";

                width: auto;

                .input-tip {
                    overflow: visible;

                    & > button {
                        overflow: visible;

                        width: auto;
                        height: $height;
                        min-width: 70px;
                        max-width: 70px;
                        padding: 0 0 0 5px;

                        cursor: pointer;
                        color: transparent;
                        font-size: inherit;
                        line-height: $height;
                        text-align: left;
                        text-shadow: 0 0 0 $ignite-brand-success;

                        border: none;
                        box-shadow: none;

                        &:hover, &:focus {
                            text-shadow: 0 0 0 change-color($ignite-brand-success, $lightness: 26%);
                        }

                        button {
                            color: $text-color;
                        }
                    }
                }

                ul.dropdown-menu {
                    span {
                        text-shadow: none;
                    }
                }
            }
        }
    }

    .btn-ignite,
    &-filter,
    &-number-filter,
    &-dateperiod {
        float: right;

        margin-left: 20px;
        margin-right: 0;

        .timepicker--ignite {
            width: 45px;
        }
    }

    &-dateperiod {
        margin-left: 15px;
        margin-right: -5px;
    }

    .grid-settings {
        svg {
            cursor: pointer;
            color: #424242;
        }
    }
}

.grid-settings {
    display: inline-block;

    margin-left: 10px;
}
